package Utils;

import java.util.HashSet;
import java.util.Map;
import java.util.Random;
import java.util.Set;

public class RandomId {
    private static Set<Integer> integerSet = new HashSet<>();
    public static  int  getRandomId(){
        int billid ;
        do {
            Random random = new Random();
            // 生成一个 8 位数的随机数
            billid = random.nextInt(90000000) + 10000000;
        } while (integerSet.contains(billid));
        integerSet.add(billid);
        return billid;
    }
}
